﻿using System;

namespace Otgruzka.Controls.jQuery
{
    public static class DateTimeExtensions
    {
        public static string GetDateString(this DateTime date)
        {
            return date.ToString("dd.MM.yyyy");
        }

        public static string GetDateString(this DateTime? date)
        {
            if (date.HasValue)
            {
                return date.Value.GetDateString();
            }
            else
            {
                return string.Empty;
            }
        }
    }
}
